home *** CD-ROM | disk | FTP | other *** search
- on mouseDown
- global gCurrentPosC
- set Delta to the mouseV - the locV of sprite 13
- set TempV to the mouseV - Delta
- set TempV2 to the mouseV
- repeat while the mouseDown
- if rollOver(12) and (TempV2 <> the mouseV) then
- set TempV to the mouseV - Delta
- set TempV2 to the mouseV
- if TempV > (SpriteBottom(12) - (SpriteHeight(13) / 2)) then
- set the locV of sprite 13 to SpriteBottom(12) - (SpriteHeight(13) / 2)
- else
- if TempV < (SpriteTop(12) + (SpriteHeight(13) / 2)) then
- set the locV of sprite 13 to SpriteTop(12) + (SpriteHeight(13) / 2)
- else
- set the locV of sprite 13 to TempV
- end if
- end if
- set Percent to (the locV of sprite 13 - SpriteTop(12) - (SpriteHeight(13) / 2)) / ((SpriteHeight(12) - SpriteHeight(13)) * 1.0)
- if Percent >= 1 then
- setAt(gCurrentPosC, 1, getAt(gNbItemC, 1) - 20)
- else
- if Percent = 0 then
- setAt(gCurrentPosC, 1, 1)
- else
- setAt(gCurrentPosC, 1, integer(Percent * 21) + 1)
- end if
- end if
- SetWinContenu2(1, 14)
- end if
- end repeat
- ActiveFieldC(1)
- end
-